<?php

/**
 * @author thihien
 * @copyright 2011
 */

require_once('includes/general.php');
//session_start();
if(!tep_db_checkDb()) die('ko ket noi dc csdl');

?>

<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<meta name="author" content="thihien" />
    <link href="css/reset.css" rel="stylesheet" type="text/css" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
	<title>IPHONE </title>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.validate.min.js"></script>
    <script type="text/javascript" src="js/jquery.validate.js"></script>
    
    <script type="text/javascript">
        
 
        $(document).ready(function($){
            $("#fr_lienhe").validate({
                rules:{
                  name:"required",
                  email:"required",
                  noidung:"required"  
                },
                messages:{
                    name:"Please enter your name",
                    email:"Please enter your email",
                    noidung:"Please enter your content"
                }
            }
            );
           
        });
        
    </script>
</head>

<body>
    <!--bat dau wrapper-->
    <div id="wrapper">
        <!--bat dau header-->
        <div id="header">
            <!-- bat dau menu top-->
            <div id="menu_top">
                <ul>
                    <li><a href="<?php echo 'index.php' ?>">home</a></li>
                    <li><a href="<?php echo '?page=sanpham' ?>">iphone repairs</a></li>
                    <li><a href="<?php echo '?page=sanpham_khac' ?>">other repairs</a></li>
                    <li><a href="<?php echo 'index.php' ?>">parts</a></li>
                    <li><a href="<?php echo '?page=lienhe' ?>">contact us</a></li>
                </ul>
            </div>
           <div id="duonggachbanner"></div>
            <!-- ket thuc menu top-->
        </div>
        <!--ket thuc header-->
        
        <!--bat dau main-->
        <div id="main">
        
        <div id="duongvien"></div>
            <!--bat dau menu_left-->
            <div id="menu_left">
                <!--bat dau menu-->                
                <div id="category" class="modules">
                    <h3>category</h3>                    
                    <!--<p>category</p>-->
                        <ul id="menu">
                        <?php $sql='select * from danhmucsanpham';
                            $kq=tep_db_query($sql);
                            while($item=tep_db_fetch_array($kq)){?>
                                <li><a href="<?php echo '?madanhmuc='.$item['id'].''?>"><?php echo ''.$item['tendanhmuc'].''?></a></li>
                                
                            <?php }?>
                         
                                                      
                        </ul>
                    
                    <!--ket thuc menu-->
                    <div class="bottom"></div>
                </div>
                
                <!--bat dau follow_us-->
                <div id="follow_us" class="modules">
                    <h3>follow us</h3>
                    <div class="content_module">
                        <a href="http://www.facebook.com/" class="facebook">facebook</a>
                        <a href="http://twitter.com/" class="twitter">twitter</a>
                        <a href="http://www.youtube.com/" class="youtube">youtube</a>
                        <div class="clear"></div>
                    </div>
                    
                </div>
               <!--ket thuc follow_us-->
               <!--bat dau information-->
               <div id="information" class="modules">
                    <h3>technical information</h3>
                    <div class="content_module">
                        <ul>
                            <?php $sql1='select * from tintuc';
                            $kq1=tep_db_query($sql1);
                            while($item1=tep_db_fetch_array($kq1)){?>
                                <li><a href="<?php echo '?page=tintuc&matintuc='.$item1['id'].'' ?>" class="title"><?php echo ''.$item1['tieude'].''?></a>
                                
                                   <p><?php echo ''.$item1['motangangon'].''?></p> 
                                   <p style="color: red;" align="right" ><a  id="detail" href="<?php echo '?page=tintuc&matintuc='.$item1['id'].'' ?>" >detail...</a></p>
                                   </span>
                                 
                                </li>
                                 
                            <?php }?>
                        </ul>
                    </div>
               </div>
               <!--ket thuc information-->
            </div>
            <!--ket thuc menu_left-->
            
            
            <!--bat dau center-->
            <?php if(isset($_REQUEST['page']) && $_REQUEST['page']==sanpham) {
                require_once('sanpham.php');
            }
            elseif(isset($_REQUEST['madanhmuc'])){
               require_once('sanpham_theodm.php'); 
            }
             elseif(isset($_REQUEST['page']) && $_REQUEST['page']==sanpham_khac){
               require_once('sanphamkhac.php'); 
            }
            elseif(isset($_REQUEST['mode']) && $_REQUEST['mode']==detail){
               require_once('chitietsanpham.php'); 
            }
            elseif(isset($_REQUEST['page']) && $_REQUEST['page']==lienhe){
               require_once('lienhe.php'); 
            }
            elseif(isset($_REQUEST['page']) && $_REQUEST['page']==tintuc){
               require_once('tintuc.php'); 
            }
            elseif(isset($_REQUEST['page']) && $_REQUEST['page']==gioithieu){
               require_once('chitiet_gt_sp.php'); 
            }else{?>
            <div id="center">
                <!--bat dau div introduce-->
                <div id="introduce">
                     <div id="introduce_sp">
                        <!-- background top_center.jpg -->
                        <div class="int_top"></div>
                        <!-- end top -->
                        <div class="int_center">
                            <div class="title1"><h4>introduce </h4></div>
                            <div id="duonggach"></div>
                            <div id="gt_sanpham">
                                <?php $sql1='select * from gioithieu limit 1';
                                    $kq1=tep_db_query($sql1);
                                    while($item1=tep_db_fetch_array($kq1)){?>
                                    <div id="hinhanh">
                                        <a href="<?php echo '?page=gioithieu' ?>"><img  height="120" src="admin/upload/<?php echo ''.$item1['hinhanh'].''?>"/></a>
                                    </div>
                                    <div id="loigiothieu">
                                        <?php echo ''.$item1['motangangon'].''?>
                                    </div>
                                    <div align="right" style="color: red;" class="detail"><a href="<?php echo '?page=gioithieu' ?>">detail...</a></div>
    
                                <?php }?>
                            
                            </div>
                        </div>                        
                        <!-- background bottom_center.jpg -->
                        <div class="int_bottom"></div>
                        <!-- end bottom -->
                        <div class="clear"></div>
                    </div>
                    <div id="about_us">
                         <div class="title"><h3>about us </h3></div>
                         <div id="giothieu_congty">
                            <?php
                                $sql="select * from gioithieu_congty";
                                $kq=tep_db_query($sql);
                                $item=tep_db_fetch_array($kq);
                                echo ''.$item['noidung'].''; 
                             ?>
                         
                         </div>
                    </div>
                </div>
                <!--ket thuc div introduce-->
                
                <!--bat dau quick_link-->
                <div id="quick_link">
                    <div class="title1"><h4>quick link </h4></div>
                    <div id="hinh_quick">
                        <div id="hinh1">
                            <a href="#"><img  src="images/iphone-quicklink.jpg"/></a>
                            <div align="center">Pepair</div>
                        </div>
                        <div id="hinh2"><a href="#"><img  src="images/sound.jpg"/></a>
                            <div align="center">Testimonials</div>
                        </div>
                        <div id="hinh3"><a href="#"><img  src="images/video.jpg"/></a>
                             <div align="center">Video</div>
                        </div>
                       <div id="hinh4"><a href="#"><img  src="images/annotation.png"/></a>
                           <div align="center">FAQ</div>
                        </div>
                         <div id="hinh5"><a href="#"><img  src="images/lock.jpg"/></a>
                            <div align="center">Account</div>
                        </div>
                      
                    </div>
                   
                </div>
                <!--ket thuc quick_link-->
                
                <!--bat dau typical products-->
                <div id="typical_products">
                     <div class="title"><h3>typical products </h3>
                        <?php $sql1='select * from sanpham limit 9';
                            $kq1=tep_db_query($sql1);
                            while($item1=tep_db_fetch_array($kq1)){?>
                            <ul>
                                <li><a href="<?php echo '?masp='.$item1['id'].'&madanhmucsp='.$item1['madanhmuc'].'&mode=detail"' ?>><img  height="120" src="admin/upload/<?php echo ''.$item1['hinhanh'].''?>"/></a>
                                        <p class="tensp"><?php echo ''.$item1['tensanpham'].''?></p>
                                        <p>Your Price:$<?php echo ''.$item1['gia'].'.00'?></p>
                                </li>
                                <?php }?>
                            </ul>
                                
                     </div>
                </div>
                <!--ket thuc typical products-->
                
                <!--bat dau sale_items-->
                <div id="sale_items">
                     <div class="title"><h3>sale items </h3>
                         <?php $sql1='select * from sanpham where giakhuyenmai!=0 limit 6';
                            $kq1=tep_db_query($sql1);
                            while($item1=tep_db_fetch_array($kq1)){?>
                            <ul>
                                <li><a href="#"><img  height="120" src="admin/upload/<?php echo ''.$item1['hinhanh'].''?>"/></a>
                                        <p><?php echo ''.$item1['tensanpham'].''?></p>
                                        <p>$<?php echo ''.$item1['gia'].'.00'?></p>
                                        <p>$<?php echo ''.$item1['giakhuyenmai'].'.00' ?><img src="images/sale.png" /></p>
                                </li>
                                <?php }?>
                            </ul>
                                
                     </div>
                     
                </div>
                <!--ket thuc sale_items-->
                
            </div>
            <!--ket thuc center--><?php } ?>
            <div class="clear"></div>
        </div>
        <!--ket thuc main-->
        <div id="duonggachbanner"></div>
        <div id="footer">
            
            <div id="congty">Copyright © 2011 - www.saloncongdanh.com<br />
                            Designed by Mạng Kết Nối Việt </div>
            <div id="congty_lienhe">
                 <?php $sql3='select * from thongtincongty';
                        $kq3=tep_db_query($sql3);
                        $item2=tep_db_fetch_array($kq3);?>
                        <div id="tieude_ct"><?php echo ''.$item2['tieude'].'' ?></div>
                        <div id="noidung_ct"><?php echo ''.$item2['noidung'].'' ?></div>  
            </div>
            <div id="desgin">Design by Công ty<a href="http://www.vietconnet.com"> MẠNG KẾT NỐI VIỆT</a>
                 - Nhà cung cấp <a href="http://www.vietconnet.com/VN/Index.aspx?P=151&knv=1&knv1=1">
                 thông tin doanh nghiệp</a>, 
                <a href="http://www.vietconnet.com/VN/Index.aspx?P=5">thiết kế website</a>, 
                <a href="http://www.baogiaquangcaogoogle.com">google adwords</a> hàng đầu VN.</div>
           
        </div>
    </div>
    <!-- ket thuc wrapper-->

</body>
</html>
